package com.example.service;

import cn.hutool.core.util.ObjectUtil;
import com.example.dao.XueyuanInfoDao;
import com.example.dao.ZhuanyeInfoDao;
import com.example.entity.XueYuanInfo;
import com.example.entity.ZhuanYeInfo;
import com.example.exception.CustomException;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 涛某
 * @version 1.0
 * @date 2024/3/24 11:52
 */
@Service
public class ZhuanyeInfoService {
    @Autowired
    private ZhuanyeInfoDao zhuanyeInfoDao;

    public List<ZhuanYeInfo> findAll() {
        return zhuanyeInfoDao.findAll();
    }


    public void add(ZhuanYeInfo zhuanYeInfo) {
         zhuanyeInfoDao.add(zhuanYeInfo);
    }

    public void update(ZhuanYeInfo zhuanYeInfo) {
        zhuanyeInfoDao.update();
    }

    public void del(Long id) {
        zhuanyeInfoDao.del(id);
    }

    public List<ZhuanYeInfo> search(String search) {
        List<ZhuanYeInfo> list =  zhuanyeInfoDao.search(search);
        return list;
    }
}
